// src/api/auth.ts
import request from "../utils/request";
import type { LoginRequest, ApiResponse } from "../type/api";

export const authApi = {
  sendSms: (phone: string): Promise<ApiResponse<void>> => {
    return request.post("/auth/sms/sendCode", { phone }).then((res) => res.data);
  },

  login: (data: LoginRequest): Promise<ApiResponse> => {
    return request.post("/auth/login", data).then((res) => res.data);
  },
};
